<template>
  <div class="org-main-header">
    <span class="org-main-title-text">{{ title }}</span>
    <el-tag v-if="showTag" type="warning" effect="plain" size="mini" class="org-main-has-auth">
      待认证
    </el-tag>
  </div>
</template>

<script>
  import { mapGetters } from 'vuex';

  export default {
    props: {
      title: {
        type: String,
        default: '',
      },
      titleType: {
        type: String,
        default: '',
      },
    },
    computed: {
      ...mapGetters('user', ['hasAuthOrg']),

      showTag() {
        return this.titleType === 'company' && !this.hasAuthOrg;
      },
    },
  };
</script>

<style lang="scss" scoped>
  .org-main-header {
    height: 50px;
    background-color: #ffffff;
    padding: 15px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 5px 5px 0 0;
  }
  .org-main-title-text {
    color: #4f4d50;
    margin-right: 10px;
  }
  .org-main-has-auth {
    // cursor: pointer;
    font-weight: normal;
  }
</style>
